class Solution {
public:
    bool makeEqual(vector<string>& words) {
        vector<int> tongji(30, 0);
        for(int i = 0; i < words.size(); i++){
            for(int j = 0; j < words[i].length(); j++){
                tongji[words[i][j] - 'a'] ++;
            }
        }
        for(int i = 0; i < 30; i++){
            if(tongji[i] % words.size())return false;
        }
        return true;
    }
};

//2021.6.13 
